<%-- 
    Document   : pesantersimpan
    Created on : 09 Jun 13, 3:45:56
    Author     : Asus
--%>

<%@page import="bean.Pembelian"%>
<%@page import="java.util.logging.Logger"%>
<%@page import="java.util.logging.Level"%>
<%@page import="java.sql.SQLException"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="bean.OraConnection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
     <font size = "5"><b><a href = "index.jsp" style="text-decoration: none">[Home]</a></b></font>
        <%
  
                    String nama = (String) request.getParameter("user");
                    String email =(String) request.getParameter("mail");
                    String pesan = (String) request.getParameter("psn");


                     Connection conn6 = OraConnection.open("jdbc:oracle:thin:@localhost:1521:xe", "hr", "115314023");
                    Statement statement6 = null;
                    try {
                        statement6 = conn6.createStatement();
                        String sql6 = "insert into pesan values ('"
                                + nama + "','" + email + "','"
                                + pesan
                                + "')";
                        statement6.executeUpdate(sql6);
                        conn6.close();
                    } catch (SQLException ex) {
                        Logger.getLogger(Pembelian.class.getName()).log(Level.SEVERE, null, ex);
                    }

                    out.print("<CENTER><h1>PESAN TERSIMPAN</H1></CENTER>");


                   %>
    </body>
</html>
